DEFINITION MODULE VPrinter;

(*
VDI Printer Functions.

UK __DATE__ __TIME__
*)

(*DEF_SWITCHES*)

FROM VDI    IMPORT XY;
FROM PORTAB IMPORT UNSIGNEDWORD,SIGNEDWORD;

(* [V]DI: [Form] [Adv]ance *************************************************)

PROCEDURE VFormAdv(Handle: UNSIGNEDWORD);

(* [V]DI: [Output] [Window] ************************************************)

PROCEDURE VOutputWindow(    Handle: UNSIGNEDWORD;
                        VAR PXY   : ARRAY OF XY);

(* [V]DI: [Clear] [Disp]lay [List] *****************************************)

PROCEDURE VClearDispList(Handle: UNSIGNEDWORD);

(* [V]DI: Output [Bit] [Image] File ****************************************)

TYPE HorizontalAlignments = (BILeft,BICenter,BIRight);
     VerticalAlignments = (BITop,BIMiddle,BIBottom);

PROCEDURE VBitImage(    Handle: UNSIGNEDWORD;
                    VAR Path  : ARRAY OF CHAR;
                        Aspect: BOOLEAN;
                        XScale: BOOLEAN;
                        YScale: BOOLEAN;
                        HAlign: HorizontalAlignments;
                        VAlign: VerticalAlignments;
                    VAR PXY   : ARRAY OF XY);

(* [V]DI: Output e[X]tended [Bit] [Image] File *****************************)

PROCEDURE VXBitImage(    Handle    : UNSIGNEDWORD;
                     VAR Path      : ARRAY OF CHAR;
                         Aspect    : BOOLEAN;
                         XScale    : BOOLEAN;
                         YScale    : BOOLEAN;
                         HAlign    : HorizontalAlignments;
                         VAlign    : VerticalAlignments;
                         Rotate    : UNSIGNEDWORD;
                         BackGround: UNSIGNEDWORD;
                         ForeGround: UNSIGNEDWORD;
                     VAR PXY       : ARRAY OF XY);

(* [V]DI: [Q]uery Printer [Scan] *******************************************)

PROCEDURE VQScan(    Handle     : UNSIGNEDWORD;
                 VAR Slices     : UNSIGNEDWORD;
                 VAR PageHeight : UNSIGNEDWORD;
                 VAR SliceHeight: UNSIGNEDWORD;
                 VAR LinesPage  : UNSIGNEDWORD;
                 VAR DivFactor  : UNSIGNEDWORD);

(* [V]DI: Output [Alpha] [Text] ********************************************)

CONST DC2 = 22C;

      BoldFaceOn     = "0";
      BoldFaceOff    = "1";

      ItalicsOn      = "2";
      ItalicsOff     = "3";

      UnderlineOn    = "4";
      UnderlineOff   = "5";

      SuperscriptOn  = "6";
      SuperscriptOff = "7";

      SubscriptOn    = "8";
      SubscriptOff   = "9";

      NLQOn          = "A";
      NLQOff         = "B";

      ExpandedOn     = "C";
      ExpandedOff    = "D";

      LightOn        = "E";
      LightOff       = "F";

      Pica           = "W";
      Elite          = "X";

      Condensed      = "Y";
      Proportional   = "Z";

PROCEDURE VAlphaText(    Handle: UNSIGNEDWORD;
                     VAR String: ARRAY OF CHAR);

(* [V]DI: Set [Orient]ation ************************************************)

TYPE Orientations = (Portrait,Landscape);

PROCEDURE VOrient(Handle: UNSIGNEDWORD;
                  Orient: Orientations);

(* [V]DI: Make [Copies] ****************************************************)

PROCEDURE VCopies(Handle: UNSIGNEDWORD;
                  Count : UNSIGNEDWORD);

(* [V]DI: Select [Tray] ****************************************************)

CONST Manual   = -1;
      Default  =  0;
      FirstOpt =  1;

PROCEDURE VTray(Handle: UNSIGNEDWORD;
                Tray  : SIGNEDWORD);

(* [V]DI: Set [P]ost [S]cript [Halftone] Mask ******************************)

PROCEDURE VPSHalftone(Handle   : UNSIGNEDWORD;
                      Index    : UNSIGNEDWORD;
                      Angle    : UNSIGNEDWORD;
                      Frequency: UNSIGNEDWORD);

(* [V]DI: [Escape] [2000] **************************************************)

PROCEDURE VEscape2000(Handle: UNSIGNEDWORD;
                      Times : UNSIGNEDWORD);

END VPrinter.
